home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / disk / misc / string11.lha / strings.doc < prev    next >
Encoding:
Text File  |  1993-09-17  |  7.3 KB  |  243 lines

  1.         ***** ******* ****   *  **    *  ****   ***** 
  2.        *         *    *   *  *  * *   * *      *
  3.         ****     *    ****   *  *  *  * *  ***  ****
  4.             *    *    *  *   *  *   * * *    *      *
  5.        *****     *    *   *  *  *    **  ***** *****
  6.  
  7.     -----------------------------------------------------
  8.                 Release 1.1
  9.  
  10.                  Written by:
  11.                Anders Lindgren
  12.  
  13.               Extract character strings
  14.               from (all type of) files.
  15.     -----------------------------------------------------
  16.  
  17.     This program may be freely distributed, but no warranty
  18.     is given!
  19.  
  20.  
  21.     You can include this program in any commercial product,
  22.     but if you do so, I would appreciate a registrated copy.
  23.  
  24.     If you think this utility is useful, please send me a
  25.     postcard telling me so. Please also write to me if you
  26.     have any suggestions, questions or if you like to give
  27.     me a $ or two. (I'm just a poor soldier doing my duty
  28.     for my country).
  29.  
  30.     Address:Anders Lindgren
  31.         Mälarblick 8
  32.         S-161 51 Bromma
  33.         Sweden
  34.  
  35.     BBS:    SUGA, +46 (0)8 348523
  36.               +46 (0)8 343276
  37.         (Log on, Write "Brev Anders Lindgren", to write
  38.         a letter to me).
  39.  
  40.     UseNet:    d91ali@csd.uu.se
  41.  
  42.  
  43.     -----------------------------------------------------
  44.     
  45.     Swedish User Group of Amiga   is a non-profit nation
  46.     wide club for Amiga-freaks in sweden. It has been 
  47.     operating for many years (I joined in around -87, and
  48.     have been  more or less active ever since.) A newspaper 
  49.     with 16 to 20 pages is beeing distrubuted quaterly. A BBS
  50.     is runed using the command line program NiKom, which
  51.     is written by a member of the club. (Too bad for you
  52.     non swedish speaking people that it isn't translated
  53.     yet.) For the members in Stockholm we have a meeting
  54.     every sunday between 11am and 3pm. 
  55.  
  56.     Join by inserting only 150:-  (less than $20) into the
  57.     PostGiro account 13 43 32-2. You can also just show up
  58.     at the "Verksta'n" to see what it's all about!
  59.  
  60.     Address: SUGA
  61.          Disponentvillan, Verkstan
  62.          Norrtullsgatan 12k
  63.          S-113 27 Stockholm
  64.  
  65.     -----------------------------------------------------
  66.  
  67. 0    INSTALLATION
  68. I    OVERVIEW
  69. II    USAGE
  70. III    OPTIONS
  71. IV    EXAMPLE
  72. V    REVISIONS
  73.  
  74.  
  75.                 0
  76.                INSTALLATION
  77.  
  78. This is a very simple operation to anyone who has the least knowledge
  79. of CLI or Shell. Just copy the file "strings" to your C: directory, or
  80. to anywhere else in your path.
  81.  
  82. I also recomend you, if you hasn't got one already, to create a
  83. directory called "man" or "doc" and collect all your documentation
  84. files there.
  85.  
  86.  
  87.                 I
  88.                 OVERVIEW 
  89.  
  90. Strings is a short utility program written to find character strings
  91. in any type of file, typically an executable. It will read the file,
  92. searching for all strings. If one is found, it is printed out.
  93.  
  94. Strings can be used to see which messages a program can print out, or
  95. to find which libraries it requiers. The program can also be used as a
  96. "filter" to strip out unwanted control character. Its use is only
  97. limited to Your imagination.
  98.  
  99. The program is fairly short, only about 3 Kb. It "stands on its own
  100. legs", i.e. it doesn't use any external libraries or resources. 
  101.  
  102. No Workbench icon exists because you have no use for it from the wb.
  103.  
  104. For you technicans out there; Strings is written in C, using the
  105. SAS C compiler.
  106.  
  107.  
  108.                 II
  109.                    USAGE
  110.  
  111. To use the program type:
  112.     strings [-e] [-nX] [-o outfile] [-b] [infile]
  113.      or:strings -u|-?
  114.  
  115. If a "infile" is given, Strings will read from it, otherwise it will
  116. read from the standard input. (normally the keyboard). If the -o
  117. switch exists the output will be written to a separate output file,
  118. otherwist the output will be printed to the standard output (normally
  119. the screen).
  120.  
  121. This means that Strings can simply be made part of a pipeline, for
  122. those blessed with shells which are capable if it. (That means almost
  123. every shell on the market, excpet Commodores own. I personally
  124. recomend you to buy William S. Hawes' WShell.)
  125.  
  126. If "infile" is present on the command line, it must be the last
  127. argument.
  128.  
  129. A "string" is a series of printable characters. Leading spaces
  130. is not considered part of a string.
  131.  
  132. The program can be terminated by pressing ctrl-C, or by executing
  133. a "Break" command from another CLI/Shell.
  134.  
  135. Problems: Due to the difficulties to decide what is a string
  136. and what is just random characters, some lines of garbage can
  137. be printed. You, the user, can influense this by using the -e and
  138. -n switches appropriate (See the next section).
  139.  
  140.  
  141.  
  142.                 III
  143.                   OPTIONS
  144.  
  145. -e    : Print out strings which contains characters from the
  146.       extended character set. (That means characters from
  147.       160 to 255). By default this switch is disabled. If the
  148.       switch is present, the extended characterset is used.
  149.       (Why? Well, in Sweden and many other europeean contries,
  150.       the characters in the "upper half" is used often, for
  151.       example "åäö" is part of the swedish alphabet. All the
  152.       special Amiga characters, like © ° ® is included there
  153.       etc.)
  154.  
  155. -nX    : Set the length of the shortest string to print. By default
  156.       the value of X is six.
  157.  
  158. -o name    : Write the output to file "name" instead of to the standard
  159.       output.
  160.  
  161. -b    : Write the position of the string, in hexadecimal bytes, in
  162.       front of the string.
  163.  
  164. -u or -?: Print out a simple help text.
  165.  
  166. The switched -e and -b toggles from disabled to enabled, and vice
  167. versa.  If two switches of the same type, "strings -e -e", exists on
  168. the command line, they take eachother out. If several -n switches
  169. exist the last one rules. 
  170.  
  171. To "force" -e or -b into disabled or enabled mode, write -e0 or -e1
  172. respecively.
  173.  
  174. This means that You can create an alias with other defaults than the
  175. ones I have choosed, without loosing any flexibility. (Se section
  176. EXAMPLE).
  177.  
  178.                 IV            
  179.                   EXAMPLE
  180.  
  181. 1> strings c:sort
  182. FROM/A,TO/A,COLSTART/K
  183. Bad args
  184. ...
  185. The result is that some lines of text, containing the command "sort"s
  186. messages, will scroll by.
  187.  
  188.  
  189. 1> strings -b c:sort
  190. 069D:FROM/A,TO/A,COLSTART/K
  191. 06B5:Bad args
  192. ...
  193. The -b switch enables the byteoffset, "069D:" etc., to be printed.
  194.  
  195.  
  196. > strings -e c:sort
  197. Iúÿî(lÿü/
  198. p$AÕÊÕÊ.
  199. ...
  200. FROM/A,TO/A,COLSTART/K
  201. Bad args
  202. ...
  203. The -e switch adds all high byte characters to its list of printable
  204. characters, so some lines containing garbage will be printed.
  205. Fortunately all true strings containing the extended character set
  206. will be printed.
  207.  
  208.  
  209. 1> strings -n1 -e -oallan.ok allan.txt
  210. This line will act as a simple control-code stripper, since it will
  211. let all printable characters through. (Note the -n1, which means that
  212. the shortest string treshhold is one character).
  213.  
  214.  
  215. 1> alias strings "strings -e -b -n10"
  216. This alias works on WShell (it may differ a little on other shells).
  217. It makes strings use the extended character set by default, it prints
  218. out the byteoffset, and the shortest line it prints is 10 characters
  219. long.
  220. Note, that you can still use the switches to disable the options and
  221. to set a new -n value.
  222.  
  223.  
  224.                 V
  225.                  RELEASES
  226.  
  227. Release 1: 28-dec-90
  228.     Containing V1.0 binary and doc.
  229.     (No Source, since the clop() (Command Line Option Parser)
  230.     routine in ALiLib isn't fixed yet).
  231.  
  232.        XX-xxx-XX
  233.     Leading spaces not considered part of the string.
  234.  
  235. Release 1.1: 17-Sep-93
  236.     Well, what the heck, I just recompiled the program using
  237.     SAS/C 6.3, and released it.
  238.     A sequence of characters is now considered a string if it
  239.     is terminated by a 0, a newline, a carriage return or a tab.
  240.     (I'm not sure I fixed this before or after R1, but here it is.)
  241.     The source is distributed, but remember that I wrote it
  242.     wears ago.
  243.